﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="ScratchPad.Window1"
    Title="Window1" Height="580" Width="653" mc:Ignorable="d">
	<Grid>
		<StackPanel Panel.ZIndex="1" Opacity="0.25" Background="Black" Width="100" Height="100" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5,5" >
			
		</StackPanel>
		<DockPanel LastChildFill="True">
			<ScrollViewer x:Name="scrollViewerMain" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Mouse.MouseMove="ScrollViewer_MouseMove">
				<ScrollViewer.Background>
					<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
						<GradientStop Color="DarkGray" Offset="0.0" />
						<GradientStop Color="White" Offset="1.0" />
					</LinearGradientBrush>
				</ScrollViewer.Background>
				<Viewport3D x:Name="viewport3D" Focusable="True" 
						Mouse.MouseWheel="viewport3D_MouseWheel"
						Mouse.MouseMove="viewport3D_MouseMove"
                        Mouse.MouseDown="viewport3D_MouseDown"
                        Mouse.MouseUp="viewport3D_MouseUp">

					<Viewport3D.Camera>
						<PerspectiveCamera x:Name="cameraMain"
						Position="0,0,20" 
						LookDirection="0,0,-1" 
						UpDirection="0,1,0" 
						FieldOfView="35" />
					</Viewport3D.Camera>

					<ModelVisual3D x:Name="pageModel">
						<ModelVisual3D.Content>
							<Model3DGroup>
								<DirectionalLight Color="White" Direction="0,0,-1" />
								<GeometryModel3D x:Name="geometryModel3D">
									<GeometryModel3D.Transform>
										<Transform3DGroup>
											<TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
											<ScaleTransform3D ScaleX="1" ScaleY="1" ScaleZ="1"/>
											<RotateTransform3D d:EulerAngles="0,0,0">
												<RotateTransform3D.Rotation>
													<AxisAngleRotation3D Angle="0" Axis="0,1,0"/>
												</RotateTransform3D.Rotation>
											</RotateTransform3D>
											<TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
											<TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
										</Transform3DGroup>
									</GeometryModel3D.Transform>
									<GeometryModel3D.Geometry>
										<MeshGeometry3D 
										  Positions="-4,-5,0 4,-5,0 -4,5,0 4,5,0"
										  Normals="0,0,1 0,0,1 0,0,1 0,0,1"
										  TextureCoordinates="0,1 1,1 0,0 1,0"
										  TriangleIndices="0,1,2  1,3,2" />

									</GeometryModel3D.Geometry>



									<GeometryModel3D.Material>
										<DiffuseMaterial>
											<DiffuseMaterial.Brush>
												<ImageBrush ImageSource="W UMa.png" />
											</DiffuseMaterial.Brush>
										</DiffuseMaterial>
									</GeometryModel3D.Material>

									<GeometryModel3D.BackMaterial>
										<DiffuseMaterial>
											<DiffuseMaterial.Brush>
												<ImageBrush ImageSource="W UMa.png"/>
											</DiffuseMaterial.Brush>
										</DiffuseMaterial>
									</GeometryModel3D.BackMaterial>

								</GeometryModel3D>
							</Model3DGroup>
						</ModelVisual3D.Content>
					</ModelVisual3D>



				</Viewport3D>
			</ScrollViewer>
		</DockPanel>
	</Grid>
</Window>
